package com.hehui.partimejob.service.model;

import android.content.Context;
import android.graphics.drawable.Drawable;

import com.hehui.partimejob.R;
import com.hehui.partimejob.service.model.Bean.UserCompleteTaskItemBean;

import java.util.ArrayList;
import java.util.List;

public class UserCompleteTaskItemModel extends BaseModel{


    public UserCompleteTaskItemModel(Context context) {
        super(context);
    }



    public List<UserCompleteTaskItemBean> getListData(){
        ArrayList<UserCompleteTaskItemBean> userCompleteTaskItems = new ArrayList<>();
        UserCompleteTaskItemBean userCompleteTaskItemModel = new UserCompleteTaskItemBean();
        UserCompleteTaskItemBean userCompleteTaskItemModel1 = new UserCompleteTaskItemBean();
        UserCompleteTaskItemBean userCompleteTaskItemModel2 = new UserCompleteTaskItemBean();
        UserCompleteTaskItemBean userCompleteTaskItemModel3 = new UserCompleteTaskItemBean();
        userCompleteTaskItemModel.setPic(context.getDrawable(R.drawable.user1));
        userCompleteTaskItemModel.setUsername("故土");
        userCompleteTaskItemModel.setCoin(300);
        userCompleteTaskItems.add(userCompleteTaskItemModel);
        userCompleteTaskItemModel1.setPic(context.getDrawable(R.drawable.user2));
        userCompleteTaskItemModel1.setUsername("欢乐马");
        userCompleteTaskItemModel1.setCoin(300);
        userCompleteTaskItems.add(userCompleteTaskItemModel1);
        userCompleteTaskItemModel2.setPic(context.getDrawable(R.drawable.user3));
        userCompleteTaskItemModel2.setUsername("先锋陌路");
        userCompleteTaskItemModel2.setCoin(300);
        userCompleteTaskItems.add(userCompleteTaskItemModel2);
        userCompleteTaskItemModel3.setPic(context.getDrawable(R.drawable.user4));
        userCompleteTaskItemModel3.setUsername("飘影");
        userCompleteTaskItemModel3.setCoin(350);
        userCompleteTaskItems.add(userCompleteTaskItemModel3);
        return userCompleteTaskItems;
    }


    public void loadUserCompleteTask(){
        if(hasNotListener()){
            return;
        }
        listener.OnStateChanged(getTAG(),getListData());
    }
}
